.div1 {
    height: 100px;
    background: lightgreen;
    line-height: 100px;
}

.div2 {
    height: 100px;
    background: lightblue;
    display: flex;
    align-items: center;
}

.div3 {
    height: 100px;
    background: lightgreen;
    display: grid;
    align-content: center;
}

.div4 {
    height: 100px;
    background: lightblue;
    display: table-cell;
    vertical-align: middle;
}